

const { contextBridge,ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('eleApi', {
    toggleDevTools: () => ipcRenderer.send('devtools:toggle'),
    fileOpen: () => ipcRenderer.invoke('dialog:open', 'openFile'),
    directoryOpen: () => ipcRenderer.invoke('dialog:open', 'openDirectory'),
    windowClose: () => ipcRenderer.send('win:close'),
    windowMax: () => ipcRenderer.invoke('win:max'),
    windowMin: () => ipcRenderer.send('win:min')
})